<%@ page language="java" import="java.util.*" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@include file="/context/mytags.jsp"%>
<!DOCTYPE html>
<html>
 <head>
  <title>电源节点</title>
  <t:base type="jquery,easyui,tools,DatePicker"></t:base>
  <script type="text/javascript">
  //编写自定义JS代码
  </script>
 </head>
 <body>
  <t:formvalid formid="formobj" dialog="true" layout="table" action="labOpenMaterialController.do?doAdd" tiptype="3" callback="@OverriderefreshItems">
		<input type="hidden" name="deviceId" value="${deviceId}">
		<table style="" cellpadding="0" cellspacing="1" class="formtable">   
				<tr>
					<td align="right">
						<label class="Validform_label">
							耗材选择：
						</label>
					</td>
					<td class="value"> 
                	     <input id="meterialId" name="meterialId" type="hidden"  value='${item.consumeMeterial.id }'>               
					     <input id="meterialName"  type="text" style="width: 150px" class="inputxt" 
					      readonly="readonly" datatype="*" value='${item.consumeMeterial.name}'>
					     <t:choose hiddenName="meterialId" hiddenid="id" url="consumeMeterialDictController.do?goSelect" name="meterialList"
                          icon="icon-search" title="选择" textname="name" inputTextname="meterialName" isclear="false" isInit="true" ></t:choose>
							
						<span class="Validform_checktip"></span>
						<label class="Validform_label" style="display: none;">消耗品</label>
						
					</td>
				</tr>  
				 
			</table>
	</t:formvalid>
	<script>
		function refreshItems(data){
			//var win = frameElement.api.opener;
			 
			//win.$('#dictDeviceModelList').datagrid('reload');
			var win = frameElement.api.opener;
			if(data.success==true){
				win.addOrUpdateOK(data.msg);
				frameElement.api.close();
			}else{
				if(data.responseText==''||data.responseText==undefined){
					tip(data.msg);$.Hidemsg();
					
				}else{
						try{
							var emsg = data.responseText.substring(data.responseText.indexOf('错误描述'),data.responseText.indexOf('错误信息'));
							$.messager.alert('错误',emsg);$.Hidemsg();}catch(ex){
								$.messager.alert('错误',data.responseText);
								$.Hidemsg();}}
					return false;
			}
			win.reloadTable();
		
		}
	</script>
 </body>